package com.avic.modules.realtime.enums;

/**
 * @author ayetony.miao
 * @date 2022/8/10 19:45
 **/
public enum NettyEnum {

    PUSH_MESSAGE_TASK("message",1),PUSH_FREE_POINTS("free", 2);

    private String message;

    private Integer priority;


    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Integer getPriority() {
        return priority;
    }

    public void setPriority(Integer priority) {
        this.priority = priority;
    }


    public static boolean pushNameExist(String subscribeName) {
        for (NettyEnum value : NettyEnum.values()) {
            if (subscribeName.equalsIgnoreCase(value.getMessage())) {
                return true;
            }
        }
        return false;
    }

    NettyEnum(String message, Integer priority) {
        this.message = message;
        this.priority = priority;
    }
}
